package org.agridata.akvisualization.controller.ditu;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.agridata.akvisualization.result.Result;
import org.agridata.akvisualization.service.MapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/map")
@Api(tags = "地图接口")
public class MapController {

    @Autowired
    private MapService service;

    @ApiOperation("首页全是各区县生猪存栏量")
    @PostMapping("/breedingStock")
    public Result breedingStock(){
        return service.breedingStockAK();
    }

    @ApiOperation("地图二级页面数据根据区县id")
    @PostMapping("/county")
    public Result county(Integer regionId,String pointType,String mid){
        return service.countyByRegionId(regionId,pointType,mid);
    }
}
